package com.lin.chapter36;

public class NobleMan extends EventCustomer {
    public NobleMan(){
        super(EventCustomType.EDIT);
        super.addCustomType(EventCustomType.CLONE);
    }

    @Override
    public void exec(ProductEvent event) {
        Product p = event.getSource();
        ProductEventType eventType = event.getEventType();
        if (eventType.getValue() == EventCustomType.CLONE.getValue()){
            System.out.println("贵族处理事件：" + p.getName() + " 克隆，事件类型=" + eventType);
        }else {
            System.out.println("贵族处理事件：" + p.getName() + " 修改，事件类型=" + eventType);
        }
    }
}
